﻿<!--#include file="mymin.asp"-->
<card title="添加友链"><p>
<%
dim classs,name,link,shorts
classs=Request.Form("class")
shorts=Trim(Request.Form("short"))
name=Trim(Request.Form("name"))
link=LCase(Trim(Request.Form("link")))

if shorts="" or name="" or link="" then
	Noclass
else
	IF left(link,7)<>"http://" Then
		Nolink
	else
		classsave
	end if
end if

sub classsave()
	dim Rs,Sql
	Set RS=server.createobject("adodb.recordset")
	Sql="select * from 74hu_link"
	RS.open sql,myconn,1,3
	RS.addnew
	RS("name")=name
	RS("namt")=shorts
	RS("classid")=classs
	RS("url")=link
	RS("active")=0
	RS("jian")="暂时没有介绍…"
	RS.update
	RS.close
	set RS=Nothing
	w "友链添加成功<br/>"
End Sub
sub Noclass()
	w "全部都要填写完整<br/><a href='Links_add.asp?sid="&sid&"'>返回修改</a>"
End Sub
sub Nolink()
	w "友链要以http://开头<br/><a href='Links_add.asp?sid="&sid&"'>返回修改</a>"
End Sub
%><br/><a href='mymin_index.asp?sid=<%=sid%>'>[友链管理]</a>
<%Call last%>
